Skip to content

Conversation

@brianaj
Copy link
Collaborator

@brianaj brianaj commented Nov 17, 2025

image

Adds support for downloading migration logs using a --migration-id parameter as an alternative to specifying --github-org and --github-repo. This addresses the original issue where users couldn't download logs when they had a migration ID but the migration wasn't found via org/repo lookup.

Usage

New migration ID approach:

gh gei download-logs --migration-id <migration-id>

Existing org/repo approach (unchanged):

gh gei download-logs --github-target-org my-org --target-repo my-repo
  • Did you write/update appropriate tests
  • Release notes updated (if appropriate)
  • Appropriate logging output
  • Issue linked
  • Docs updated (or issue created)
  • New package licenses are added to ThirdPartyNotices.txt (if applicable)

@github-actions
Copy link

github-actions bot commented Nov 17, 2025

Unit Test Results

  1 files    1 suites   10m 25s ⏱️
955 tests 955 ✅ 0 💤 0 ❌
956 runs  956 ✅ 0 💤 0 ❌

Results for commit f68edcb.

♻️ This comment has been updated with latest results.

@brianaj brianaj changed the title use migration id for downloading logs Add support for downloading logs by migration ID Dec 1, 2025
@brianaj brianaj marked this pull request as ready for review December 1, 2025 19:39
Copilot AI review requested due to automatic review settings December 1, 2025 19:39
Copilot finished reviewing on behalf of brianaj December 1, 2025 19:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for downloading migration logs using a --migration-id parameter as an alternative to specifying --github-org and --github-repo, addressing the scenario where users have a migration ID but the migration isn't found via org/repo lookup.

Key changes:

  • Made --github-org and --github-repo optional parameters in all three CLI commands (gei, ado2gh, bbs2gh)
  • Added new --migration-id option that allows direct log download by migration ID
  • Implemented mutual exclusivity validation: either migration-id OR both org/repo must be provided

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/gei/Commands/DownloadLogs/DownloadLogsCommand.cs Removed IsRequired = true from GithubRepo and GithubOrg options
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandBase.cs Added MigrationId option and removed IsRequired from base options
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandArgs.cs Added MigrationId property to command arguments
src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs Implemented validation and dual-path logic for migration-id vs org/repo lookup
src/OctoshiftCLI.Tests/gei/Commands/DownloadLogs/DownloadLogsCommandTests.cs Updated test to reflect new option count and optional parameters
src/OctoshiftCLI.Tests/bbs2gh/Commands/DownloadLogs/DownloadLogsCommandTests.cs Updated test to reflect new option count and optional parameters
src/OctoshiftCLI.Tests/ado2gh/Commands/DownloadLogs/DownloadLogsCommandTests.cs Updated test to reflect new option count and optional parameters
RELEASENOTES.md Added release note describing the new --migration-id feature
Comments suppressed due to low confidence (1)

src/Octoshift/Commands/DownloadLogs/DownloadLogsCommandHandler.cs:85

  • This assignment to State is useless, since its value is never read.
    This assignment to WarningsCount is useless, since its value is never read.
    This assignment to FailureReason is useless, since its value is never read.
            var (State, RepositoryName, WarningsCount, FailureReason, MigrationLogUrl) = migrationResult.Result;

… local variable

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
ado2gh 72% 70% 712
Octoshift 83% 72% 1736
bbs2gh 83% 77% 653
gei 81% 72% 574
Summary 81% (7727 / 9592) 73% (1827 / 2509) 3675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants